<template>
	<view class="flex-colume-start squarePage">
		<view class="flex-colume-start index-bg1">
			<view class="flex-row-center banner-box1">
				<view class="flex-colume-center banner1" @click="bannerClick('','新闻')">
					<image mode="aspectFit" src="/static/index/index-b1.png"></image>
					<view>新 闻</view>
				</view>
				<view @click="bannerClick('','妙招')" class="flex-colume-center banner1"
					style="margin-left: 8rpx; margin-right: 8rpx;">
					<image style="width: 65rpx;" mode="aspectFit" src="/static/index/index-b2.png"></image>
					<view>妙 招</view>
				</view>
				<view @click="bannerClick('','真相')" class="flex-colume-center banner1">
					<image style="width: 50rpx;" mode="aspectFit" src="/static/index/index-b3.png"></image>
					<view>真 相</view>
				</view>
			</view>
			
			
			<view class="flex-row-center index-item1">
				<image src="/static/index/index-item1.png"></image>
				<view @click="bannerClick('经典视频','电影')" class="b12"
					style="top: 95rpx; left: 52rpx; width: 175rpx; height: 235rpx;"></view>
				<view @click="bannerClick('经典视频','历史')" class="b12"
					style="top: 95rpx; left: 255rpx; width: 175rpx; height: 160rpx;"></view>
				<view @click="bannerClick('经典视频','采访')" class="b12"
					style="top: 95rpx; left: 452rpx; width: 175rpx; height: 395rpx;"></view>
				<view @click="bannerClick('经典视频','人物')" class="b12"
					style="top: 358rpx; left: 52rpx; width: 175rpx; height: 135rpx;"></view>
				<view @click="bannerClick('经典视频','风景')" class="b12"
					style="top: 280rpx; left: 255rpx; width: 175rpx; height: 215rpx;"></view>
			</view>
			<view class="flex-row-center index-item1">
				<image style="height: 520rpx;" src="/static/index/index-item2.png"></image>
				<view @click="bannerClick('岁月静好','音乐')" class="b12"
					style="top: 95rpx; left: 52rpx; width: 175rpx; height: 235rpx;"></view>
				<view @click="bannerClick('岁月静好','棋牌')" class="b12"
					style="top: 95rpx; left: 255rpx; width: 175rpx; height: 160rpx;"></view>
				<view @click="bannerClick('岁月静好','书画')" class="b12"
					style="top: 95rpx; left: 452rpx; width: 175rpx; height: 115rpx;"></view>
				<view @click="bannerClick('岁月静好','美食')" class="b12"
					style="top: 358rpx; left: 52rpx; width: 175rpx; height: 135rpx;"></view>
				<view @click="bannerClick('岁月静好','宠物')" class="b12"
					style="top: 280rpx; left: 255rpx; width: 175rpx; height: 215rpx;"></view>
				<view @click="bannerClick('岁月静好','种植')" class="b12"
					style="top: 235rpx; left: 452rpx; width: 175rpx; height: 115rpx;"></view>
				<view @click="bannerClick('岁月静好','工艺')" class="b12"
					style="top: 376rpx; left: 452rpx; width: 175rpx; height: 115rpx;"></view>
			</view>
			<view class="flex-row-center index-item1">
				<image style="height: 519rpx;" src="/static/index/index-item3.png"></image>
				<view @click="bannerClick('户外活动','摄影')" class="b12"
					style="top: 95rpx; left: 52rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('户外活动','旅游')" class="b12"
					style="top: 95rpx; left: 255rpx; width: 170rpx; height: 390rpx;"></view>
				<view @click="bannerClick('户外活动','健身')" class="b12"
					style="top: 95rpx; left: 455rpx; width: 170rpx; height: 390rpx;"></view>
				<view @click="bannerClick('户外活动','钓鱼')" class="b12"
					style="top: 285rpx; left: 52rpx; width: 170rpx; height: 200rpx;"></view>
			</view>
			<view class="flex-row-center index-item1 index-item2">
				<image style="height: 285rpx;" src="/static/index/index-item4.png"></image>
				<view @click="bannerClick('文化鉴赏','茶道')" class="b12"
					style="top: 95rpx; left: 52rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('文化鉴赏','佛学')" class="b12"
					style="top: 95rpx; left: 255rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('文化鉴赏','其他')" class="b12"
					style="top: 95rpx; left: 458rpx; width: 170rpx; height: 160rpx;"></view>
			</view>
			<view class="flex-row-center index-item1 index-item2">
				<image style="height: 288rpx;" src="/static/index/index-item5.png"></image>
				<view @click="bannerClick('家庭关系','家庭')" class="b12"
					style="top: 95rpx; left: 52rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('家庭关系','法治')" class="b12"
					style="top: 95rpx; left: 255rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('家庭关系','其他')" class="b12"
					style="top: 95rpx; left: 458rpx; width: 170rpx; height: 160rpx;"></view>
			</view>
			<view class="flex-row-center index-item1 index-item2">
				<image style="height: 287rpx;" src="/static/index/index-item6.png"></image>
				<view @click="bannerClick('能力提升','写作')" class="b12"
					style="top: 95rpx; left: 52rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('能力提升','外语')" class="b12"
					style="top: 95rpx; left: 255rpx; width: 170rpx; height: 160rpx;"></view>
				<view @click="bannerClick('能力提升','电脑')" class="b12"
					style="top: 95rpx; left: 455rpx; width: 170rpx; height: 160rpx;"></view>
			</view>
			
			<view style="height: 40rpx;"></view>
			<view style="height: calc(env(safe-area-inset-bottom) + 49px);"></view>
			

		</view>
	


		<custom-tab-bar :selected="3"></custom-tab-bar>


	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {
			centerBtnClick() {
				uni.switchTab({
					url: '/pages/tab/center'
				})
			},
			bannerClick(cate1,cate2){
				var cate = {
					cate1:cate1,
					cate2:cate2
				}
				if (cate1 === ''){
					uni.navigateTo({
						url:'/pages/index/newsList?cateStr='+ encodeURIComponent(JSON.stringify(cate))
					})
					
					return
				}
				uni.navigateTo({
					url:'/pages/index/videoList?cateStr='+ encodeURIComponent(JSON.stringify(cate))
				})
			}

		}
	}
</script>

<style lang="scss" scoped>
	.squarePage {
		.index-bg1 {
			width: 750rpx;
			// height: 519rpx;
			background: url('https://app.yiheshuyuan.cn/static/weixin/xcxPic/index-bg1.png');
			background-size: 100% 519rpx;
			background-repeat: no-repeat;
			
		}

		.index-item1 {
			position: relative;
			width: 676rpx;
			height: 540rpx;
			background-color: white;
			border-radius: 20rpx;
			margin-top: 30rpx;

			image {
				width: 656rpx;
				height: 523rpx;
			}

			.b12 {
				position: absolute;
				// background-color: red;
			}

		}

		.index-item2 {
			height: 303rpx;
		}

		.banner-box1 {
			margin-top: 46rpx;
			height: 188rpx;
			width: 676rpx;
			background: url('https://app.yiheshuyuan.cn/static/weixin/xcxPic/index-b0.png');
			background-size: 100% 100%;

			.banner1 {
				width: 220rpx;
				height: 188rpx;
				border-radius: 20rpx;

				image {
					width: 55rpx;
					height: 100rpx;
				}

				view {
					color: white;
					font-size: 30rpx;
					font-weight: 600;
					margin-bottom: 16rpx;
				}
			}

		}

	}
</style>